package xuegao.study.mall.repo.dao.oms;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import xuegao.study.mall.common.dto.OmsOrderDeliveryParam;
import xuegao.study.mall.common.dto.OmsOrderDetail;
import xuegao.study.mall.common.dto.OmsOrderQueryParam;
import xuegao.study.mall.common.model.oms.OmsOrder;
import xuegao.study.mall.common.model.oms.OmsOrderItem;

import java.util.List;

public interface OmsOrderDao  extends BaseMapper<OmsOrder> {

    List<OmsOrder> getList(@Param("queryParam") OmsOrderQueryParam queryParam);

    int delivery(@Param("list") List<OmsOrderDeliveryParam> deliveryParamList);

    OmsOrderDetail getDetail(@Param("id") Long id);

    int updateByPrimaryKey(OmsOrder omsOrder);

    int updateSkuStock(@Param("itemList") List<OmsOrderItem> orderItemList);

    List<OmsOrderDetail> getTimeOutOrders(@Param("minute") Integer minute);

    int updateOrderStatus(@Param("ids") List<Long> ids, @Param("status") Integer status);

    int releaseSkuStockLock(@Param("itemList") List<OmsOrderItem> orderItemList);

    int deleteByIds(@Param("ids") List<Long> ids, @Param("deleteStatus") Integer deleteStatus);
}
